import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import qiankun from 'vite-plugin-qiankun';
import { resolve } from 'path';

export default defineConfig({
  plugins: [
    vue(),
    qiankun('design-ui', {  // 👈 添加 qiankun 插件，'design' 是应用名
      useDevMode: true
    })
  ],
  resolve: {
    alias: {
      '@': resolve(__dirname, '../src')
    }
  },
  root: resolve(__dirname),
  server: {
    port: 3001,
    cors: true,
    origin: 'http://localhost:3001'  // 重要！
  }
});